From 26693828822a10b58baad36f7dfed9d8ec576dd3 Mon Sep 17 00:00:00 2001 From: tsteven4 Date: Wed, 4 Sep 2013 00:19:06 +0000 Subject: [PATCH] fix waypoint counting errors in tpo and igc readers. add a filter to check the counts against the lists. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4589 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/Makefile.in | 2 +- gpsbabel/filter_vecs.cc | 6 + gpsbabel/reference/LineStyles.kml | 1470 +++++++++++++------------- gpsbabel/route.cc | 2 + gpsbabel/tpo.cc | 4 +- gpsbabel/validate.cc | 144 +++ gpsbabel/xmldoc/filters/validate.xml | 3 + 7 files changed, 877 insertions(+), 754 deletions(-) create mode 100644 gpsbabel/validate.cc create mode 100644 gpsbabel/xmldoc/filters/validate.xml diff --git a/gpsbabel/Makefile.in b/gpsbabel/Makefile.in index 54009cd63..6df5af759 100644 --- a/gpsbabel/Makefile.in +++ b/gpsbabel/Makefile.in @@ -89,7 +89,7 @@ FMTS=@FMTS@ FILTERS=bend.o position.o radius.o duplicate.o arcdist.o polygon.o smplrout.o \ reverse_route.o sort.o stackfilter.o trackfilter.o discard.o \ - nukedata.o interpolate.o transform.o height.o swapdata.o + nukedata.o interpolate.o transform.o height.o swapdata.o validate.o JEEPS=jeeps/gpsapp.o jeeps/gpscom.o \ jeeps/gpsmath.o jeeps/gpsmem.o \ diff --git a/gpsbabel/filter_vecs.cc b/gpsbabel/filter_vecs.cc index 5a072e20e..2d2ef72f2 100644 --- a/gpsbabel/filter_vecs.cc +++ b/gpsbabel/filter_vecs.cc @@ -49,6 +49,7 @@ extern filter_vecs_t interpolatefilt_vecs; extern filter_vecs_t transform_vecs; extern filter_vecs_t height_vecs; extern filter_vecs_t swapdata_vecs; +extern filter_vecs_t validate_vecs; static fl_vecs_t filter_vec_list[] = { @@ -138,6 +139,11 @@ fl_vecs_t filter_vec_list[] = { "swap", "Swap latitude and longitude of all loaded points" }, + { + &validate_vecs, + "validate", + "Validate internal data structures" + }, #elif defined (MINIMAL_FILTERS) { diff --git a/gpsbabel/reference/LineStyles.kml b/gpsbabel/reference/LineStyles.kml index e11628057..4d53894e3 100644 --- a/gpsbabel/reference/LineStyles.kml +++ b/gpsbabel/reference/LineStyles.kml @@ -7,33 +7,6 @@ 37.523278 5908.813619 - - - - - - - normal - #route_n - - - highlight - #route_h - -